<?php
include('conString.php');

$gender="";
if (isset($_POST['Submit'])) 
{
  //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
	$selected_radio = $_POST['gender'];

	if ($selected_radio == 'male') 
	{
		$gender="Male";
	}
	else if ($selected_radio == 'female') 	
	{
		$gender="Female";
	}

	$FName=$_POST['txtFName'];
	$LName=$_POST['txtSname'];
	$Add=$_POST['txtAddress'];
	$Cell=$_POST['txtCell'];
	$Tel=$_POST['txtTel'];
	$eMail=$_POST['txtEmail'];
	$active=$_POST['lstActive'];
	
	$insert="Insert into employees (`FName`,`LName`,`Gender`,`Address`,`Cell`,`Tel`,`eMail`,`Active`) 
						values('$FName','$LName', '$gender', '$Add', '$Cell', '$Tel','$eMail', '$active')";
	$sqlCMD=mysql_query($insert);

	if(!$sqlCMD)
	{
		die ("cannot insert : " . mysql_error());
	}
	echo ("You have succefully inserted " . $FName . " in the databse");
}

?>



